<template>
  <div class="wallet_details_group_page">
    <ul> 
        <li class="line" v-for="(value, key) in details">
            <dl class="itemstyle">
                <dt class="leftitem">{{key}} :</dt>
                <dt>{{value | fiter_details(key, value)}}</dt>
            </dl>
        </li>
    </ul>
  </div>
</template>


<script lang="ts">
import { Component, Vue ,Prop} from "vue-property-decorator";
import Search from "./search.vue";
import { State, Getter, Action, Mutation } from "vuex-class";
import axios from "axios";
import { AxiosPromise } from "axios";
import tools from "@/server/tools";
const namespace: string = "order_mrg";
@Component({
  components: {
    Search
  },
  filters: {
    fiter_details(value:any, key:any){
        console.log("key, value:", key, value)
        if(key == "createTime" || key == 'lastModifyTime') {
            return tools.getTime(value)
        }
        return value
      //return tools.getTime(time)
    }
  }
})
export default class Ordermrg extends Vue {
  @Getter("get_sig_details", { namespace }) details: any;
  @Action("get_signal_details", { namespace }) get_signal_details: any;
  @Prop() private orderId!: string;
  handleEdit = (index: any, row: any) => {
    console.log("handleEdit:", index, row);
  };

  handleDelete = (index: any, row: any) => {
    console.log("handleDelete:", index, row);
  };

  activated () {
    // console.log("--------------------------- cec8c9dd3ef24713b5f51a56627d4851" , this.$route.params.orderId)
    this.get_signal_details({id: this.orderId})
    // this.get_order_details({orderId: "cec8c9dd3ef24713b5f51a56627d4851"})
  }

  mounted() {
   let self = this
   setTimeout(function () {
       console.log("self.details:", self.details)
   }, 2000)
  }
}
</script>
<style scoped lang="scss">
.wallet_details_group_page {
  margin: 0 auto;
  .line{
      .itemstyle{
          display:flex;
          .leftitem{
              width:200px;
              text-align: right;
              margin-right:20px;
          }
      }
  }
}
</style>